<legend class='hyc-legend'>
    <span>车型油耗导入</span>
</legend>
<div class="col-md-13" style="margin-bottom: 40px">
    <div style="font-size: 16px; text-align: left; position: relative;">
        <span>第一步:下载车型油耗导入模板，批量录入车型油耗调整数据</span>
        <!--<div class="btn btn-default btn-sm btn-warning" ng-click="loadData('query')">模板下载</div>&nbsp;&nbsp;&nbsp;-->
        <a class="btn btn-warning" href="../../downLoad/ils-sc-template-02.xlsx">模版下载</a>
    </div>
    <div style="font-size: 16px; text-align: left; position: relative;">
        <span>第二步:上传填写好的油耗调整信息表</span>
        <input class="btn btn-warning" type="file" name="file" id="file" nv-file-select="" uploader="uploader"/>
    </div>
    <table class="table" style="display: none">
        <thead>
            <tr>
                <th width="50%">文件名</th>
                <th ng-show="uploader.isHTML5">文件大小</th>
                <th ng-show="uploader.isHTML5">导入进度条</th>
                <th>成功状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="item in uploader.queue">
                <td><strong>{{ item.file.name }}</strong></td>
                <td ng-show="uploader.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>
                <td ng-show="uploader.isHTML5">
                    <div class="progress" style="margin-bottom: 0;">
                        <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                    </div>
                </td>
                <td class="text-center">
                    <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                    <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                    <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                </td>
                <td nowrap>
                    <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()"
                            ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                        <span class="glyphicon glyphicon-upload">导入</span>
                    </button>
                    <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()"
                            ng-disabled="!item.isUploading">
                        <span class="glyphicon glyphicon-ban-circle">取消</span>
                    </button>
                    <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                        <span class="glyphicon glyphicon-trash">移除</span>
                    </button>
                </td>
            </tr>
        </tbody>
    </table>
</div>
<div class="pull-right" style="font-size: 16px; margin-bottom: 10px;">
    <div class="btn btn-warning" ng-click="delete()">取消导入</div>
    <div class="btn btn-warning" ng-click="importData(item)">确认导入</div>
</div>
<table class="table table-bordered" style="margin-top: 10px;">
    <tr>
        <th class="text-center">车型编码</th>
        <th class="text-center">车型ID</th>
        <th class="text-center">油箱容积</th>
        <th class="text-center">油品</th>
        <th class="text-center">油耗</th>
        <th class="text-center">生效日期</th>
        <th class="text-center">检查结果</th>
        <th class="text-center">说明</th>
        <th class="text-center">导入结果</th>
        <th class="text-center">操作</th>
    </tr>
    <tr ng-repeat="item in vehicleList track by $index" ng-if="vehicleList.length > 0"
        ng-class="{'hyc-color-ff8888':item.validateResultCodeString == '错误','hyc-color-66ff66':item.validateResultCodeString == '警告'}">
        <td class="text-center">{{item.vehicleClassName}}</td>
        <td class="text-center">{{item.vehicleClassId}}</td>
        <td class="text-center">{{item.tankVolume}}</td>
        <td class="text-center">{{item.oilTypeName}}</td>
        <td class="text-center">{{item.standardOc}}</td>
        <td class="text-center">{{item.effectiveDate | limitTo:10}}</td>
        <td class="text-center">{{item.validateResultCodeString}}</td>
        <td class="text-center">{{item.validateResult}}</td>
        <td class="text-center">{{item.importResult}}</td>
        <td class="text-center">
            <a href="javascript:;" ng-click="showUpdateDlg(item)" ng-hide="item.isLock">修改</a>&nbsp;&nbsp;
            <a href="javascript:;" ng-click="del(item)" ng-hide="item.isLock">删除</a>
        </td>
    </tr>
    <tr ng-if="vehicleList.length <= 0">
        <td class="text-center" colspan="13">暂无符合条件数据</td>
    </tr>
</table>
<div ng-include="pageIncludeUrl" ng-if="vehicleList.length > 0"></div>